<extend name="Public/base"/>
<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>评论列表</h2>
	</div>

	<!-- 按钮工具栏 -->
	<div class="cf">
		<div class="fl">
			

		<!-- 高级搜索 -->
		<div class="search-form fr cf">

           
		</div>
	</div>

	<!-- 数据表格 -->
    <div class="data-table">
		<table>
            <!-- 表头 -->
            <thead>
                <tr>
                    <th class="row-selected row-selected">
                        <input class="check-all" type="checkbox">
                    </th>
                    <th>作者</th>
                    <th>对象</th>
                    <th>内容</th>
                    <th>时间</th>                    
                    <th>操作</th>
                </tr>
            </thead>

            <!-- 列表 -->
            <tbody>
                <volist name="_list" id="data">
                  
                     <tr class="pointer even" title="">
                        <td><input class="ids" type="checkbox" name="id[]" value="{$data.id}" /></td>
                        <td><a href="{$data['item_url']}" target='_blank'>{$data['nickname']}</a></td>
                        <td>{$data['title']}</td>
                        <td>{$data['content']}</td>
                        <td>{:date('Y-m-d H:i:s',$data['create_time'])}</td>
                        <td> 
                            <a class="confirm ajax-get"  href="{:U('Comment/del',array('id'=>$data['id']))}" title="删除">删除</a>
                        </td>
                    </tr>
                </volist>
            </tbody>
        </table>
	</div>
	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
</div>

</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
		var status = $("#sch-sort-txt").attr("data");
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
		if(status != ''){
			query = 'status=' + status + "&" + query;
        }
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});

	

    //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    });
    highlight_subnav("{:U('Comment/index')}");

 
})
</script>
</block>
